package cn.itcast;

import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;


@SpringBootApplication
public class BosManagementAppilcation {

    public static void main(String[] args) throws Exception {
        SpringApplication.run(BosManagementAppilcation.class,args);
        //1.创建一本书
        /*HSSFWorkbook book = new HSSFWorkbook();
        //2.创建书的页
        HSSFSheet sheet = book.createSheet("第一页");
        //3.创建行数，50行
        for (int i = 0; i < 50; i++) {
            HSSFRow row = sheet.createRow(i);
            //4.创建单元格 一行10格
            for (int i1 = 0; i1 < 10; i1++) {
                row.createCell(i1).setCellValue(i1);
            }
        }
        //5.创建输出流写到桌面上
        FileOutputStream out = new FileOutputStream("C:\\Users\\zms\\Desktop\\1.xls");
                    book.write(out);
                    //6.关闭输出流
                    out.close();
                    */
    }

}
